Skip to content

Update config tutorial section to 1.0#468

Merged
becker33 merged 13 commits into
spack:mainfrom
scheibelp:cfg-compilers-1.0
Aug 5, 2025
Merged

Update config tutorial section to 1.0#468
becker33 merged 13 commits into
spack:mainfrom
scheibelp:cfg-compilers-1.0

Conversation

@scheibelp

@scheibelp scheibelp commented Jul 31, 2025

Copy link
Copy Markdown
Member
  • Right now just the compilers part and intro are updated everything up to the "Installation Permissions" section is updated (I don't anticipate any major edits in that section or any after)
  • For intro:
    • overrides (::) use config: section as example
  • For compilers
    • Compilers are in the packages: section
    • And some attributes have moved around inside of it (but generally look the same)
    • can't set target in the compiler entry anymore
    • Toolchain example is added for hybrid compiler
  • Packages:
    • concretization examples updated (they are all different because e.g. compiler modeling)
    • preferences for compilers is done differently now (I use require: Update August 4: I'm now using prefer: and later on using require for hdf5~mpi, which is smoother overall)
    • concretizations for hdf5+mpi ^mpich@4.0 weren't quite the same, so I truncated that part and emphasized the error message (vs. intermediate step where you concretize and don't see hdf5+mpi)
  • A couple examples that installed things have been updated to just call spack spec (pending updates to tutorial image)

@scheibelp scheibelp requested a review from becker33 July 31, 2025 22:22

@becker33 becker33 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the first bit where we cover the sections of the available config, we should remove the compilers section since it's deprecated. Around line 27 in the rst file.

It would be great if we could find time/space for an include example, but I don't know what the changes have done to the timing so I don't know if that's possible. It might be more valuable than some of the stuff in the "high level config" segment but that doesn't mean we have time to make that happen for the HPCIC tutorial.

Comment thread tutorial_configuration.rst Outdated
all:
compiler: [clang, gcc, intel, pgi, xl, nag, fj]
require:
- one_of: ["%llvm", "%gcc"]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we adding this? Wouldn't this make it impossible to use our new toolchain (because it requests some of each)?

I think it would be truer to the original intent of the example to set

all:
  prefer:
  - %clang_gfortran

@scheibelp scheibelp Aug 4, 2025

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't seem to work for me when I test it out (doesn't seem to encourage use of the toolchain, or hybridizing the clang/gcc compilers)

I did run through the whole tutorial with one_of, and I agree I'm not clear why it ends up allowing mixing (a bug maybe), but anyhow

  • Replacing it with any_of worked for me
  • And I think that ought to fit with what we intend

Have you used a preference for a toolchain before?

(trying prefer: [%clang_gfortran] also appears to significantly increase concretization times)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I retried this with prefer: [%llvm] and it went better, so that's what the tutorial looks like now

@becker33 becker33 merged commit b81f94f into spack:main Aug 5, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants